This module provides a portable way of using operating system dependent functionality. If you just want to read or write a file see open(). Os.path · Shutil · Interpreting stat() results · Platform
The error occurs because when a python interpreter is opened interactively, sys.argv will be [''] , so an empty string is passed to the execl-invoked python ...